/**
 * 秒转小时
 * @param {String|Number} time 秒数
 * @return {String} text
 */
function secondToDate (second) {
	second = parseInt(second, 10);

	const days = Math.floor(second / 86400);
	const hours = Math.floor((second % 86400) / 3600);
	const minutes = Math.floor(((second % 86400) % 3600) / 60);
	const seconds = Math.floor(((second % 86400) % 3600) % 60);
	const duration = days + "天" + hours + "小时" + minutes + "分" + seconds + "秒";

	return duration;
}

export default secondToDate;
